package com.instwall.mockclientapp;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.instwall.rpccallnumclient.CallNumClient;


public class MainActivity extends AppCompatActivity {

    private CallNumClient client;
    private static final String TAG = MainActivity.class.getName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        client = CallNumClient.get();
        client.installCallNumClient(this);
        client.setEngineDataListener(new CallNumClient.ModuleImpl() {
            @Override
            public void getNewCallNum(String data) {
                Log.d(TAG, "[CallNumClient.ModuleImpl][getNewCallNum()]" + data);
            }
        }, null);

    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        client.unsetEngineDataListenere();
    }
}
